package com.paradogs.gs.modules.role.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.paradogs.common.misc.VirtualSupportServiceImpl;
import com.paradogs.common.utils.Virtual;
import com.paradogs.gs.db.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author: yumi
 * @date: 2024/10/23  21:54
 * @Description: TODO
 */
@Component
public class RoleDao extends VirtualSupportServiceImpl<RoleMapper, Role> implements IService<Role> {

    @Autowired
    private RoleMapper roleMapper;

    public void slowQuery() {
        Virtual.of(roleMapper::slowQuery);
    }

}
interface RoleMapper extends BaseMapper<Role> {
    @Select("SELECT SLEEP(60)")
    void slowQuery();

}
